# Maintainer:
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: dorphell <dorphell@archlinux.org>

pkgname=wvdial
pkgver=1.61
pkgrel=8
pkgdesc="A dialer program to connect to the Internet"
url="https://web.archive.org/web/20110504183753/http://alumnit.ca:80/wiki/index.php?page=WvDial"
arch=('loong64' 'x86_64')
license=('custom')
depends=('wvstreams' 'ppp' 'gcc-libs')
makedepends=('lockdev')
options=('!makeflags' '!buildflags')
source=("https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/wvstreams/${pkgname}-${pkgver}.tar.gz")
sha512sums=('e949632583d889ad040c284f42c46790d247fffbc2d5e926c4b5836c970002f07741d26d052489bdc9c8144dcbb62a12851a3c275a5cecd5393d2722f43bb49a')

build() {
  cd "${srcdir}"/${pkgname}-${pkgver}
  ./configure
  make LOCKDEV="-llockdev"
}

package() {
  cd "${srcdir}"/${pkgname}-${pkgver}
  make prefix="${pkgdir}"/usr PPPDIR="${pkgdir}"/etc/ppp/peers install

  install -Dm644 COPYING.LIB "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}
